import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
export default new Vuex.Store({
  state: {
    isLogin: '',
    menus: [{
      path: ''
    }],
    title: '',
    current: ['userList'],
    editUserInfo: {}
  },
  mutations: {
    Login (state, data) {
      state.isLogin = data
    },
    addMenus (state, data) {
      state.menus.push({ path: data })
    },
    clearMenus (state) {
      state.menus = []
    },
    changeTitle (state, data) {
      state.title = data
    },
    changeCurrent (state, data) {
      state.current = [data]
    },
    changeEditUserInfo (state, data) {
      state.editUserInfo = data
    }
  },
  actions: {

  }
})
